<template>
	<view>
		<view class="smart-panel-head">
			<view class="smart-panel-head-title">checkbox多选框</view>
		</view>
		<view class="smart-padding-wrap">
			<view class="section-title">默认样式：</view>
			<view class="item default-style">
				<label class="checkbox-label">
					<checkbox checked="true"></checkbox>
					<text>选中</text>
				</label>
				<label class="checkbox-label">
					<checkbox></checkbox>
					<text>未选中</text>
				</label>
			</view>
			<view class="section-title">不同颜色和尺寸：</view>
			<view class="item custom-style">
				<label class="checkbox-label purple-background">
					<checkbox checked="true" color="#F3A73F" style="transform: scale(0.7);"></checkbox>
					<text>选中</text>
				</label>
				<label class="checkbox-label">
					<checkbox color="#F3A73F" style="transform: scale(0.7);"></checkbox>
					<text>未选中</text>
				</label>
			</view>
			<view class="section-title">推荐展示样式：</view>
			<checkbox-group>
				<label class="list" v-for="(country, index) in countries" :key="index">
					<view>
						<checkbox :value="country"></checkbox>
						{{ country }}
					</view>
				</label>
			</checkbox-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				countries: ['中国', '美国', '巴西', '英国', '法国', '日本']
			}
		},
		methods: {

		}
	}
</script>

<style>
	.section-title {
		font-size: 28rpx;
		color: #333;
		margin: 30rpx 0 15rpx;
		font-weight: 500;
	}
	.item {
		display: flex;
		align-items: center;
		gap: 30rpx;
		padding: 10rpx 0;
	}
	.checkbox-label {
		display: inline-flex;
		align-items: center;
		gap: 10rpx;
		padding: 10rpx 16rpx;
		border-radius: 6rpx;
		cursor: pointer;
		font-size: 28rpx;
	}
	.purple-background {
		background-color: #E6E6FA;
	}
	.list {
		display: flex;
		flex-direction: column;
	}
	.list view {
		padding: 22rpx 0;
		  border-bottom: 1px solid #d8d8d8;
		  background-color: #fcb451; 
	}
	
	
	.smart-padding-wrap {
		padding: 20rpx 30rpx;
		background-color: #fff;
	}
	
	checkbox {
		width: 36rpx;
		height: 36rpx;
		margin-right: 8rpx;
	}
	
	.default-style {
		margin-bottom: 10rpx;
	}
	
	.custom-style {
		margin-bottom: 10rpx;
	}
</style>
    